import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home'
import Login from "../views/Login";
import Test1 from "@/views/Test1";
import Test2 from "@/views/Test2";

Vue.use(VueRouter)

const routes = [
  /*登录页面*/
  {
    path: '/',
    name: 'Login',
    component: Login,
    hidden: true
  },
  {
    path: '/home',
    name: 'Home',
    component: Home,
    children: [
      {
        path: "/test1",
        name: "选项1",
        component: Test1
      },
      {
        path: "/test2",
        name: "选项2",
        component: Test2
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
